/**
 * 
 */
package GUI.helpers;

import java.awt.Dimension;
import java.awt.Font;
import java.awt.Insets;

import javax.swing.JButton;

/**
 * @author mramsey3
 *
 */
public class PButton extends JButton
{

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private static final Font BUTTON_FONT = new Font(Font.SANS_SERIF,Font.PLAIN,12);
    
    /**
     * @param name
     * @param type
     */
    public PButton(String name, ButtonType type){
	super(name);
	this.setMargin(new Insets(0, 0, 0, 0));
	this.setFont(BUTTON_FONT);
	this.putClientProperty("JButton.buttonType","textured");
	switch(type){
	case LONG:
	    this.setPreferredSize(new Dimension(180, 25));
	    break;
	case MEDIUM:
	    this.setPreferredSize(new Dimension(125, 25));
	    break;
	case SHORT:
	    this.setPreferredSize(new Dimension(75, 25));
	    break;
	case EDIT:
	    this.setPreferredSize(new Dimension(50, 25));
	    break;
	}
    }

}
